SQL parameters container class
* A column name in SQL and a field accessor name of the container object are compared based on canonical case. Columns are mapped fields accessors of container class with the following rules. Rule 1: The method annotated @OrmGetter (field accessor name is the value of annotation)
Rule 2: The field annotated @OrmColumn (field accessor name is the value of annotation)
Rule 3: getX method (field accessor name is trim set/get from setter/getter)
Rule 4: Direct field access (field accessor name is the filed name)
Rule 5: public method (field accessor name is the method name. This rule is for Record class) which has no parameter and returns a value.
SQL parameters container class will be mapped with a table on the database when a insert, update, delete method is called. The table - parameter container class mapping is depend on the class name or @OrmTable annotation. By default, the simple class name of the container object is regarded as the table name.
After a mapping is created, Sorm can perform CRUD operations directly on instances of the SQL parameters container class. At first time to use a container class, Sorm will build a mapping automatically and cache it. Mapping rules
Table name candidates and table name on database are comparing based on canonical case. Table name candidates are generated by following rule (preferential order):
Rule 1: If the container class is annotated with @OrmTable, the value, the value with s and the value with es (and the value trimmed last y and added ies) become table name candidates.
Rule 2: If the container class is without @OrmTable annotation, the simple class name (java.lang.Class#getSimpleName) is regarded as the table name candidate.
SQL parameters container class will be mapped with a table when a insertIn, updateIn, deleteIn, mergeIn method is called. The table - parameter container class mapping is depend on the method arguments. Example